package sysu.el.audit;

public class Max2Int {
	public int ans1, ans2;
	public Max2Int(int init){
		this.ans1 = init;
		this.ans2 = init;
	}
	
	public Max2Int(){
		this(Integer.MIN_VALUE);
	}
	
	public void reset(){
		this.reset(Integer.MIN_VALUE);
	}
	
	public void reset(int init){
		this.ans1 = init;
		this.ans2 = init;
	}
	
	public void sample(int sam){
		if (sam > this.ans1){
			this.ans2 = this.ans1;
			this.ans1 = sam;
		}
		else if (sam > this.ans2){
			this.ans2 = sam;
		}
	}

	public static Max2Int Ins = new Max2Int();
}
